/**
 * 
 */
package com.xinghou.platform.dao.main;

import com.xinghou.platform.entity.req.ListReq;
import com.xinghou.platform.entity.resp.UserInfoResp;
import com.xinghou.platform.model.main.User;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * @author wxtdy
 *
 */
@Repository("UserDAO")
public interface UserDAO {
	
	public User getUserById(Integer userId) throws DataAccessException;
	
	public int updateUser(User user) throws DataAccessException;
	
	public int saveUser(User user) throws DataAccessException;

	public User getUserByMobile(String mobile) throws DataAccessException;
	
	public List<User> getUserList(Integer frompage)throws DataAccessException;
	
	public List<User> getUserList()throws DataAccessException;
	
	public List<User> getUsersById(int userid, int pageSize) throws DataAccessException;
	
	//public int saveUserbyStore(final User user) throws DataAccessException;
	
	public User getUserBySecondAccount(String type,String account) throws DataAccessException;

	public User getUserBySecondAccountMap(HashMap map) throws DataAccessException;

	public User getUserByPassword(String mobile, String password)throws DataAccessException;


	public List<User> getUserByStoreId(int storeid,int fromno,int limit) throws DataAccessException;
	
	public List<User> getUserByDay(int userid, int pageSize) throws DataAccessException;

	public List<User> getUserIdBySex(Short sex,String citycode) throws DataAccessException;
	
	public List<User> getUserIdByCitycode(String citycode) throws DataAccessException;

	public String getRandomUser(int scope,int sex);

	public int getMobileCount(String mobile);

	public List<UserInfoResp> userList(ListReq listReq);

	public void closureUser(ListReq listReq);

	public int getCheckMobileCount(String mobile);

	public void deletePwdCache(User user);

	public Integer getUserDateCountByWX(long bigtime,long smalltime);

	public Integer getUserDateCountByWB(long bigtime,long smalltime);

	public Integer getUserDateCountByQQ(long bigtime,long smalltime);

	public Integer getUserDateCountAll(long bigtime,long smalltime);

}
 